
package cn.wolfcode.luowowo.flight.service.impl;

import cn.wolfcode.luowowo.flight.domain.FlightTicket;
import cn.wolfcode.luowowo.flight.mapper.FlightTicketMapper;
import cn.wolfcode.luowowo.flight.service.IFlightTicketService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class FlightTicketServiceImpl implements IFlightTicketService {

    @Autowired
    private FlightTicketMapper flightTicketMapper;
    @Override
    public FlightTicket saveOrUpdate(FlightTicket ticket) {

        flightTicketMapper.insert(ticket);
        return ticket;
    }

    @Override
    public List<FlightTicket> queryByUserinfoId(Long uid) {
        return flightTicketMapper.selectByUserinfoId(uid);
    }

    @Override
    public FlightTicket queryById(Long tid) {
        return flightTicketMapper.selectByPrimaryKey(tid);
    }
}

//TODO 暂时先注释,因为我没有